Certain embodiments of the present invention are directed to integrated circuits. More particularly, some embodiments of the invention provide a system and method for stage-based control related to TRIAC dimmer. Merely by way of example, some embodiments of the invention have been applied to driving one or more light emitting diodes (LEDs). But it would be recognized that the invention has a much broader range of applicability.
A conventional lighting system may include or may not include a TRIAC dimmer that is a dimmer including a Triode for Alternating Current (TRIAC). For example, the TRIAC dimmer is either a leading-edge TRIAC dimmer or a trailing-edge TRIAC dimmer. Often, the leading-edge TRIAC dimmer and the trailing-edge TRIAC dimmer are configured to receive an alternating-current (AC) input voltage, process the AC input voltage by clipping part of the waveform of the AC input voltage, and generate a voltage that is then received by a rectifier (e.g., a full wave rectifying bridge) in order to generate a rectified output voltage.
FIG. 1 shows certain conventional timing diagrams for a leading-edge TRIAC dimmer and a trailing-edge TRIAC dimmer. The waveforms 110, 120, and 130 are merely examples. Each of the waveforms 110, 120, and 130 represents a rectified output voltage as a function of time that is generated by a rectifier. For the waveform 110, the rectifier receives an AC input voltage without any processing by a TRIAC dimmer. For the waveform 120, an AC input voltage is received by a leading-edge TRIAC dimmer, and the voltage generated by the leading-edge TRIAC dimmer is received by the rectifier, which then generates the rectified output voltage. For the waveform 130, an AC input voltage is received by a trailing-edge TRIAC dimmer, and the voltage generated by the trailing-edge TRIAC dimmer is received by the rectifier, which then generates the rectified output voltage.
As shown by the waveform 110, each cycle of the rectified output voltage has, for example, a phase angel (e.g., ϕ) that changes from 0° to 180° and then from 180° to 360°. As shown by the waveform 120, the leading-edge TRIAC dimmer usually processes the AC input voltage by clipping part of the waveform that corresponds to the phase angel starting at 0° or starting at 180°. As shown by the waveform 130, the trailing-edge TRIAC dimmer often processes the AC input voltage by clipping part of the waveform that corresponds to the phase angel ending at 180° or ending at 360°.
Various conventional technologies have been used to detect whether or not a TRIAC dimmer has been included in a lighting system, and if a TRIAC dimmer is detected to be included in the lighting system, whether the TRIAC dimmer is a leading-edge TRIAC dimmer or a trailing-edge TRIAC dimmer. In one conventional technology, a rectified output voltage generated by a rectifier is compared with a threshold voltage Vth_on in order to determine a turn-on time period Ton. If the turn-on time period Ton is approximately equal to the duration of a half cycle of the AC input voltage, no TRIAC dimmer is determined to be included in the lighting system; if the turn-on time period Ton is not approximately equal to but is smaller than the duration of a half cycle of the AC input voltage, a TRIAC dimmer is determined to be included in the lighting system. If a TRIAC dimmer is determined to be included in the lighting system, a turn-on voltage slope Von_slope is compared with the threshold voltage slope Vth_slope. If the turn-on voltage slope Von_slope is larger than the threshold voltage slope Vth_slope, the TRIAC dimmer is determined to be a leading-edge TRIAC dimmer; if the turn-on voltage slope Von_slope is smaller than the threshold voltage slope Vth_slope, the TRIAC dimmer is determined to be a trailing-edge TRIAC dimmer.
If a conventional lighting system includes a TRIAC dimmer and light emitting diodes (LEDs), the light emitting diodes may flicker if the current that flows through the TRIAC dimmer falls below a holding current that is, for example, required by the TRIAC dimmer. As an example, if the current that flows through the TRIAC dimmer falls below the holding current, the TRIAC dimmer may turn on and off repeatedly, thus causing the LEDs to flicker. As another example, the various TRIAC dimmers made by different manufacturers have different holding currents ranging from 5 mA to 50 mA.
The light emitting diodes (LEDs) are gradually replacing incandescent lamps and becoming major lighting sources. The LEDs can provide high energy efficiency and long lifetime. The dimming control of LEDs, however, faces significant challenges because of insufficient dimmer compatibility. For certain historical reasons, the TRIAC dimmers often are designed primarily suitable for incandescent lamps, which usually include resistive loads with low lighting efficiency. Such low lighting efficiency of the resistive loads often helps to satisfy the holding-current requirements of TRIAC dimmers. Hence the TRIAC dimmers may work well with the incandescent lamps. In contrast, for highly efficient LEDs, the holding-current requirements of TRIAC dimmers usually are difficult to meet. The LEDs often need less amount of input power than the incandescent lamps for the same level of illumination.
In order to meet the holding-current requirements of the TRIAC dimmers, some conventional techniques use a bleeder for a lighting system. FIG. 2 is a simplified diagram of a conventional lighting system that includes a bleeder. As shown, the conventional lighting system 200 includes a TRIAC dimmer 210, a rectifier 220, a bleeder 224, a diode 226, capacitors 230, 232, 234, 236 and 238, a pulse-width-modulation (PWM) controller 240, a winding 260, a transistor 262, resistors 270, 272, 274, 276, 278 and 279, and one or more LEDs 250. The PWM controller 240 includes controller terminals 242, 244, 246, 248, 252, 254, 256 and 258. For example, the PWM controller 240 is a chip, and each of the controller terminals 242, 244, 246, 248, 252, 254, 256 and 258 is a pin. In yet another example, the winding 260 includes winding terminals 263 and 265.
The TRIAC dimmer 210 receives an AC input voltage 214 (e.g., VAC) and generates a voltage 212. The voltage 212 is received by the rectifier 220 (e.g., a full wave rectifying bridge), which then generates a rectified output voltage 222. The rectified output voltage 222 is larger than or equal to zero. The resistor 279 includes resistor terminals 235 and 239, and the capacitor 236 includes capacitor terminals 281 and 283. The resistor terminal 235 receives the rectified output voltage 222. The resistor terminal 239 is connected to the capacitor terminal 281, the controller terminal 252, and a gate terminal of the transistor 262. The gate terminal of the transistor 262 receives a gate voltage 237 from the resistor terminal 239, the capacitor terminal 281, and the controller terminal 252. The capacitor terminal 283 receives a ground voltage.
As shown in FIG. 2, the rectified output voltage 222 is used to charge the capacitor 236 through the resistor 279 to raise the gate voltage 237. In response, if the result of the gate voltage 237 minus a source voltage at a source terminal of the transistor 262 reaches or exceeds a transistor threshold voltage, the transistor 262 is turned on. When the transistor 262 is turned on, through the transistor 262 and the controller terminal 254, a current flows into the PWM controller 240 and uses an internal path to charge the capacitor 232. In response, the capacitor 232 generates a capacitor voltage 233, which is received by the controller terminal 244. If the capacitor voltage 233 reaches or exceeds an undervoltage-lockout threshold of the PWM controller 240, the PWM controller 240 starts up.
After the PWM controller 240 has started up, a pulse-width-modulation (PWM) signal 255 is generated. The PWM signal 255 has a signal frequency and a duty cycle. The PWM signal 255 is received by the source terminal of the transistor 262 through the terminal 254. The transistor 262 is turned on and off, in order to make an output current 266 constant and provide the output current 266 to the one or more LEDs 250, by working with at least the capacitor 238.
As shown in FIG. 2, a drain voltage at a drain terminal of the transistor 262 is received by a voltage divider that includes the resistors 276 and 278. The drain terminal of the transistor 262 is connected to the winding terminal 265 of the winding 260, and the winding terminal 263 of the winding 260 is connected to the capacitor 230 and the resistor 279. In response, the voltage divider generates a voltage 277, which is received by the controller terminal 256. The PWM controller 240 uses the voltage 277 to detect the end of a demagnetization process of the winding 260. The detection of the end of the demagnetization process is used to control an internal error amplifier of the PWM controller 240, and through the controller terminal 246, to control charging and discharging of the capacitor 234.
Also, after the PWM controller 240 has started up, the resistor 274 is used to detect a current 261, which flows through the winding 260. The current 261 flows from the winding 260 through the resistor 274, which in response generates a sensing voltage 275. The sensing voltage 275 is received by the PWM controller 240 at the controller terminal 258, and is processed by the PWM controller 240 on a cycle-by-cycle basis. The peak magnitude of the sensing voltage 275 is sampled, and the sampled signal is sent to an input terminal of the internal error amplifier of the PWM controller 240. The other input terminal of the internal error amplifier receives a reference voltage Vref.
As shown in FIG. 2, the rectified output voltage 222 is received by a voltage divider that includes the resistors 270 and 272. In response, the voltage divider generates a voltage 271, which is received by the controller terminal 242. The PWM controller 240 processes the voltage 271 and determines phase angle of the voltage 271. Based on the detected range of phase angle of the voltage 271, the PWM controller 240 adjusts the reference voltage Vref, which is received by the internal error amplifier.
The bleeder 224 is used to ensure that, when the TRIAC dimmer 210 is fired on, an input current 264 that flows through the TRIAC dimmer 210 is larger than a holding current required by the TRIAC dimmer 210, in order to avoid misfire of the TRIAC dimmer 210 and also avoid flickering of the one or more LEDs 250. For example, the bleeder 224 includes a resistor, which receives the rectified output voltage 222 at one resistor terminal of the resistor and receives the ground voltage at the other resistor terminal of the resistor. The resistor of the bleeder 224 allows a bleeder current 268 to flow through as at least part of the input current 264. In another example, if the holding current required by the TRIAC dimmer 210 is small and if the average current that flows through the transistor 262 can satisfy the holding current requirement of the TRIAC dimmer 210, the bleeder 224 is not activated or is simply removed.
As shown in FIG. 2, the lighting system 200 includes, for example, a quasi-resonant system with a buck-boost topology. The output current 266 of the quasi-resonant system is received by the one or more LEDs 250 and is determined as follows:
                              I          o                =                              1            2                    ×                                    V              ref                                      R              cs                                                          (                  Equation          ⁢                                          ⁢          1                )            where I0 represents the output current 266 of the quasi-resonant system of the lighting system 200. Additionally, Vref represents the reference voltage received by the internal error amplifier of the PWM controller 240. Moreover, Rcs represents the resistance of the resistor 274.
FIG. 3 is a simplified diagram showing certain conventional components of the lighting system 200 as shown in FIG. 2. The pulse-width-modulation (PWM) controller 240 includes a dimming control component 300 and a transistor 350. The dimming control component 300 includes a phase detector 310, a reference voltage generator 320, a pulse-width-modulation (PWM) signal generator 330, and a driver 340.
FIG. 4 shows certain conventional timing diagrams for the lighting system 200 as shown in FIGS. 2 and 3. The waveform 471 represents the voltage 271 as a function of time, the waveform 412 represents the phase signal 312 as a function of time, the waveform 475 represents the sensing voltage 275 as a function of time, and the waveform 464 represents cycle-by-cycle average of the input current 264 as a function of time.
As shown by FIGS. 3 and 4, the lighting system 200 uses a closed loop to perform dimming control. The phase detector 310 receives the voltage 271 through the terminal 242, detects phase angle of the voltage 271, and generates a phase signal 312 that indicates the detected range of phase angle of the voltage 271. As shown by the waveform 471, the voltage 271 becomes larger than a dim-on threshold voltage (e.g., Vth_dimon) at time ta and becomes smaller than a dim-off threshold voltage (e.g., Vth_dimoff) at time tb. The dim-on threshold voltage (e.g., Vth_dimon) is equal to or different from the dim-off threshold voltage (e.g., Vth_dimoff). The time duration from time ta to time tb is represented by TR, during which the phase signal 312 is at the logic high level, as shown by the waveform 412. The time duration TR represents the detected range of phase angle of the voltage 271.
During the time duration TR, the sensing voltage 275 ramps up and down. For example, during the time duration TR, within a switching period (e.g., TSW), the sensing voltage 275 ramps up, ramps down, and then remains constant (e.g., remains equal to zero) until the end of the switching period (e.g., until the end of TSW).
The phase signal 312 is received by the reference voltage generator 320, which uses the detected range of phase angle of the voltage 271 to generate the reference voltage 322 (e.g., Vref). As shown in FIG. 3, the reference voltage 322 (e.g., Vref) is received by the PWM signal generator 330. For example, the PWM signal generator 330 includes the internal error amplifier of the PWM controller 240. In another example, the PWM signal generator 330 also receives the sensing voltage 275 and generates a pulse-width-modulation (PWM) signal 332. The PWM signal 332 is received by the driver 340, which in response generates a drive signal 342 and outputs the drive signal 342 to the transistor 350. The transistor 350 includes a gate terminal, a drain terminal, and a source terminal. The gate terminal of the transistor 350 receives the drive signal 342. The drain terminal of the transistor 350 is coupled to the controller terminal 254, and the source terminal of the transistor 350 is coupled to the controller terminal 258.
As shown by the waveform 475, the reference voltage 322 (e.g., Vref) is used by the PWM signal generator 330 to generate the PWM signal 332, which is then used to control the peak magnitude (e.g., CS_peak) of the sensing voltage 275 for each PWM cycle during the time duration TR. For example, each PWM cycle corresponds to a time duration that is equal to the switching period (e.g., TSW) in magnitude. In another example, if the detected range of phase angle of the voltage 271 (e.g., corresponding to TR) becomes larger, the reference voltage 322 (e.g., Vref) also becomes larger. In yet another example, if the detected range of phase angle of the voltage 271 (e.g., corresponding to TR) becomes smaller, the reference voltage 322 (e.g., Vref) also becomes smaller.
According to Equation 1, if the reference voltage 322 (e.g., Vref) becomes larger, the output current 266 (e.g., I0) of the quasi-resonant system of the lighting system 200 also becomes larger; if the reference voltage 322 (e.g., Vref) becomes smaller, the output current 266 (e.g., I0) of the quasi-resonant system of the lighting system 200 also becomes smaller.
As shown by FIG. 2, the cycle-by-cycle average of the input current 264 is approximately equal to the sum of cycle-by-cycle average of the output current 266 (e.g., I0) and the bleeder current 268. During the time duration TR, within each switching cycle of the PWM signal 332, the output current 266 changes with time, so the average of the output current 266 within each switching cycle is used to determine the cycle-by-cycle average (e.g., I_PWM_av) of the output current 266 as a function of time. When the time duration TR becomes smaller, the reference voltage 322 (e.g., Vref) also becomes smaller and the one or more LEDs 250 are expected to become dimmer. When the time duration TR becomes too small, the reference voltage 322 (e.g., Vref) also becomes too small and the cycle-by-cycle average (e.g., I_PWM_av) of the output current 266 during the time duration TR becomes smaller than the holding current (e.g., I_holding) required by the TRIAC dimmer 210. In order to avoid misfire of the TRIAC dimmer 210 and also avoid flickering of the one or more LEDs 250, the bleeder current 268 (e.g., I_bleed) is provided in order to increase the cycle-by-cycle average of the input current 264 during the time duration TR. As shown by the waveform 464, the cycle-by-cycle average of the input current 264 during the time duration TR becomes larger than the holding current required by the TRIAC dimmer 210.
As shown in FIG. 3, the driver 340 outputs the drive signal 342 to the transistor 350. The transistor 350 is turned on if the drive signal 342 is at a logic high level, and the transistor 350 is turned off if the drive signal 342 is at a logic low level. When the transistor 262 and the transistor 350 are turned on, the current 261 flows through the winding 260, the transistor 262, the controller terminal 254, the transistor 350, the controller terminal 258, and the resistor 274. If the transistor 350 becomes turned off when the transistor 262 is still turned on, the transistor 262 then also becomes turned off and the winding 260 starts to discharge. If the transistor 350 becomes turned on when the transistor 262 is still turned off, the transistor 262 then also becomes turned on and the winding 260 starts to charge.
As shown in FIGS. 2-4, the lighting system 200 uses a closed loop to perform dimming control. For example, the lighting system 200 detects the range of phase angle of the voltage 271, and based on the detected range of phase angle, adjusts the reference voltage Vref that is received by the internal error amplifier of the PWM controller 240. In another example, the lighting system 200 provides energy to the one or more LEDs 250 throughout the entire time period of each switching cycle during the time duration TR, which corresponds to the unclipped part of the waveform of the AC input voltage 214 (e.g., VAC).
As discussed above, a bleeder (e.g., the bleeder 224) can help a lighting system (e.g., the lighting system 200) to meet the holding-current requirement of a TRIAC dimmer (e.g., the TRIAC dimmer 210) in order to avoid misfire of the TRIAC dimmer (e.g., the TRIAC dimmer 210) and avoid flickering of one or more LEDs (e.g., the one or more LEDs 250). But the bleeder (e.g., the bleeder 224) usually increases heat generation and reduces energy efficiency of the lighting system (e.g., the lighting system 200). Such reduction in energy efficiency usually becomes more severe if a bleeder current (e.g., the bleeder current 268) becomes larger. This reduced energy efficiency often prevents the lighting system (e.g., the lighting system 200) from taking full advantage of high energy efficiency and long lifetime of the one or more LEDs (e.g., the one or more LEDs 250).
Hence it is highly desirable to improve the techniques of dimming control.